package com.thinkgem.jeesite.modules.front.utils;

import java.util.List;

import com.thinkgem.jeesite.common.utils.SpringContextHolder;
import com.thinkgem.jeesite.modules.front.entity.Region;
import com.thinkgem.jeesite.modules.front.service.RegionService;

public class RegionUtils {

	private static RegionService regionService = SpringContextHolder.getBean(RegionService.class);
	
	/**
	 * 通过区域级别查询区域
	 * @param regionType
	 * @return
	 */
	public static List<Region> getRegionList(String regionType){
		Region region = new Region();
		region.setRegionType(regionType);
		return regionService.findList(region);
	}
	/**
	 * 通过ID查询区域名称
	 * @param regionType
	 * @return
	 */
	public static Object getRegionById(String id){
		return regionService.get(id);
	}
}
